﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TsSite.Master" AutoEventWireup="true" CodeBehind="ManageTireSet.aspx.cs" Inherits="TireService.Web.View.CustomerView.ManageTireSet" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.12.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.12.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <table cellpadding="0" cellspacing="2" border="0">
        <tr>
            <td>
                <img id="imgTireSet" alt="" src="~/Images/Medium/wheel.png" runat="server" style="width: 32px; height: 32px" />
            </td>
            <td valign="middle">
                <h3><asp:Label ID="lblTireSetListHeader" runat="server" Text="Administration af hjulsæt"></asp:Label></h3>
            </td>
            <td>
                <asp:UpdatePanel ID="upMessage" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <table border="0" cellspacing="0" cellpadding="5">
                            <tr>
                                <td>
                                    <div style="font-family: Tahoma; font-size: 9pt; font-weight: normal; color: #f15e34">
                                        &nbsp;<asp:Literal ID="lMessage" runat="server"></asp:Literal>
                                    </div>
                                </td>
                            </tr>
                        </table>          
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
    </table>
    <hr /> 

    <table border="0" cellspacing="0" cellpadding="5" width="370px">
        <tr>
            <td style="width:130px">
                <dx:ASPxLabel ID="lblRegNumberSearchField" runat="server" Text="Indtast bil reg.nr:">
                </dx:ASPxLabel>
            </td>
            <td style="width:170px">
                <dx:ASPxTextBox ID="txtRegNumberSearchField" runat="server" Width="140px">
                    <ValidationSettings RequiredField-ErrorText="Reg.nr skal udfyldes" RequiredField-IsRequired="true" SetFocusOnError="true" ValidationGroup="SearchRegNumber" ErrorDisplayMode="ImageWithTooltip" ValidationGroup></ValidationSettings>
                </dx:ASPxTextBox>
            </td>
            <td style="width:70px">
                <dx:ASPxButton ID="btnSearchTireSet" ClientInstanceName="btnSearchTireSet" ValidationGroup="SearchRegNumber" 
                    runat="server" Text="Søg" Width="75px" onclick="btnSearchTireSet_Click">
                </dx:ASPxButton>
            </td>
        </tr>
    </table>
    <hr /> 
    
    <dx:ASPxGridView ID="gvTireSet" runat="server" ClientInstanceName="gvTireSet" Width="100%" Visible="false" 
        KeyFieldName="TireSetId" AutoGenerateColumns="False" EnableCallBacks="True">
        <SettingsLoadingPanel Text="Henter&amp;hellip;" />
        <Settings ShowHeaderFilterButton="false" ShowGroupPanel="false" ShowFilterRow="false" />
        <SettingsPager AlwaysShowPager="false" PageSize="5" Position="Bottom">
            <Summary 
                AllPagesText="Sider: {0} - {1} ({2} hjulsæt)" 
                Text="Side {0} af {1} ({2} hjulsæt)" />
        </SettingsPager>
        <SettingsText ConfirmDelete="Vil du slette dette hjulsæt?" />
        <SettingsBehavior ConfirmDelete="True" AllowGroup="true" AllowDragDrop="true" />
        <Columns>
            <%--<dx:GridViewDataColumn Caption="Rediger" Width="75px" VisibleIndex="1">
                <DataItemTemplate>
                    <a href="javascript:void(0);" onclick="ShowEditTireSetModalPopup(this, '<%# Container.KeyValue %>')"><img src="~/Images/Tiny/wheel.png" id="imgWheel" runat="server" alt="Rediger dæk oplysninger" /></a> <a href="javascript:void(0);" onclick="ShowEditTireSetPatternModalPopup(this, '<%# Container.KeyValue %>')"><img src="~/Images/Tiny/measure.png" runat="server" id="imgTirePattern" alt="Rediger dækmønster" /></a> <a href="javascript:void(0);" onclick="ShowTireSetGraphPatternModalPopup(this, '<%# Container.KeyValue %>')"><img src="~/Images/Tiny/line-chart.png" runat="server" id="imgTirePatternGraph" alt="Vis dækmønster historik" /></a>
                </DataItemTemplate>
            </dx:GridViewDataColumn>--%>

            <dx:GridViewDataColumn FieldName="ContainerNumber" VisibleIndex="1" Caption="Lager">
            </dx:GridViewDataColumn>
            <%--<dx:GridViewDataHyperLinkColumn FieldName="ContainerCargoRoomId" VisibleIndex="2" Caption="Lagerplads">
                <PropertiesHyperLinkEdit NavigateUrlFormatString="~/View/ResourceView/ContainerList.aspx?ContainerCargoRoomId={0}" TextField="CargoRoomNumber" >
                </PropertiesHyperLinkEdit>
            </dx:GridViewDataHyperLinkColumn>--%>
            <dx:GridViewDataColumn FieldName="RegistrationNumber" VisibleIndex="2" Caption="Reg.nr">
            </dx:GridViewDataColumn>
            <dx:GridViewDataColumn FieldName="TireSetStatusId" Visible="false" VisibleIndex="5" Caption="TireSetStatusId">
            </dx:GridViewDataColumn>
            <dx:GridViewDataTextColumn FieldName="TireSetStatusDescription" VisibleIndex="5" Caption="Status">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataColumn FieldName="TireTypeId" Visible="false" VisibleIndex="5" Caption="TireTypeId">
            </dx:GridViewDataColumn>
            <dx:GridViewDataTextColumn FieldName="TireTypeDescription" VisibleIndex="5" Caption="Dæktype">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataColumn FieldName="TireBrandId" Visible="false" VisibleIndex="5" Caption="TireBrandId">
            </dx:GridViewDataColumn>
            <dx:GridViewDataTextColumn FieldName="TireBrandDescription" VisibleIndex="5" Caption="Mærke">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataColumn FieldName="TireBrandNote" VisibleIndex="5" Caption="Model variant">
            </dx:GridViewDataColumn>
            <dx:GridViewDataColumn FieldName="Size" VisibleIndex="6" Caption="Fælgstr.">
            </dx:GridViewDataColumn>
            <dx:GridViewDataTextColumn FieldName="Width" VisibleIndex="7" Caption="Bredde">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataColumn FieldName="Height" VisibleIndex="8" Caption="Højde">
            </dx:GridViewDataColumn>
            <dx:GridViewDataColumn FieldName="LeftFrontTirePattern" VisibleIndex="8" Caption="VF">
            </dx:GridViewDataColumn>
            <dx:GridViewDataColumn FieldName="RightFrontTirePattern" VisibleIndex="8" Caption="HF">
            </dx:GridViewDataColumn>
            <dx:GridViewDataColumn FieldName="LeftRearTirePattern" VisibleIndex="8" Caption="VB">
            </dx:GridViewDataColumn>
            <dx:GridViewDataColumn FieldName="RightRearTirePattern" VisibleIndex="8" Caption="HB">
            </dx:GridViewDataColumn>
            <dx:GridViewDataColumn FieldName="NeedBalancing" VisibleIndex="15" Caption="Skal afbal.">
            </dx:GridViewDataColumn>
            <dx:GridViewDataColumn FieldName="LastBalancingDate" VisibleIndex="15" Caption="Sidste afbal.">
            </dx:GridViewDataColumn>
        </Columns>
    </dx:ASPxGridView> 

</asp:Content>
